package cn.cloudtogo.support.mysql;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

/**
 * @author yaolianhua789@gmail.com
 **/
@Configuration(proxyBeanMethods = false)
@ConfigurationProperties("gendb.mysql")
@Data
@Slf4j
public class GendbBuiltInMysqlProperties {

    private String host;
    private String port;
    private String username;
    private String password;

    @PostConstruct
    public void print() {
        log.info("[load built-in mysql. url {} ]", String.format("jdbc:mysql://%s:%s", host, port));
    }
}
